<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>编辑用户</title>
</head>
<body>
<form id="updateForm" th:action="@{/users/edit}" method="post">
    <input type="hidden" name="id" th:value="${user.id }">
    <table>
        <tr>
            <td>姓名</td>
            <td><input type="text" name="name" th:value="${user.name }"></td>
        </tr>
        <tr>
            <td>体重</td>
            <td><input type="text" name="weight" th:value="${user.weight }"></td>
        </tr>
        <tr>
            <td>电话号码</td>
            <td><input type="text" name="phoneNumber" th:value="${user.phoneNumber}"></td>
        </tr>
        <tr>
            <td>邮箱</td>
            <td><input type="text" name="email" th:value="${user.email}"></td>
        </tr>
        <tr>
            <td>生日</td>
            <td><input type="text" name="birthday" th:value="${#temporals.format(user.birthday,'yyyy-MM-dd')}"></td>
        </tr>
        <tr>
            <td>薪水</td>
            <td><input type="text" name="salary" th:value="${user.salary }"></td>
        </tr>
        <tr>
            <td>图片</td>
            <td>
                <img th:src="@{/users/download(id=${user.id })}" width="200" height="200"/>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" value="修改">
            </td>
        </tr>
    </table>
</form>
</body>
</html>